<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>108Wo软装配饰设计中心 - Login</title>
<link type="text/css" rel="stylesheet" href="{CSS_PATH}108wo/style.css"/>
<script type="text/javascript" src="{JS_PATH}108wo/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{JS_PATH}108wo/cookie.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var imglist = [[$('#boxer li:first').find('img').attr('src'), $('#boxer li:first').find('p').html()]];
	var i=1;
	function x(){
		var box=$('#boxer'), b=box.find("li:first"), o=imglist.shift();
		b.hide(function(){
			var p=b.next("li").find('p');
			box.append('<li class="player_photo"><img src="'+o[0]+'"><p></p></lis>');	
			imglist.push([b.next("li").find('img').attr('src'),b.next("li").find("p").html()]);
			b.remove();
			b=box.find("li:last");
			p=b.find('p');
			$(p).text(o[1]);
			setTimeout(x,2000);
		})
	}
	$(function(){
	setTimeout(x,600);
	});
	
	
	$('.input').focus(function(){
		$(this).addClass("inputHover");					  
	})
	$('.input').blur(function(){
		$(this).removeClass("inputHover");					  
	})
	
	$('.button').hover(function(){
		$(this).addClass("hover");					  
	},function(){
		$(this).removeClass("hover");					  
	})
	

	
	$('#dosubmit').click(function(){
		if($("#username").val()==""){   
			$('#msgBox').html("<div class='err'>请输入登录名</div>");
			$('#msgBox').fadeIn("fast");
			setTimeout(function(){$("#msgBox").fadeOut("slow");},1000);
			$("#username").focus();	
			return false;		  
		}
	    if(!$("#username").val().match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)){
			$('#msgBox').html("<div class='err'>登录名为您的邮箱</div>");
			$('#msgBox').fadeIn("fast");
			setTimeout(function(){$("#msgBox").fadeOut("slow");},1000);
			$("#username").focus();	
		    return false;	 
	    }
		if($("#password").val()==""){   
			$('#msgBox').html("<div class='err'>请输入登录密码</div>");
			$('#msgBox').fadeIn("fast");
			setTimeout(function(){$("#msgBox").fadeOut("slow");},1000);
			$("#password").focus();	
			return false;		  
		}
		
		$('#msgBox').fadeIn("fast")
		$('#msgBox').html("<div class='loading'>登录中，请稍后...</div>");

		$.post($('#myform').attr('action'), $('#myform').serialize(), function(data){
			if(data == "登录成功" || data=='ok') {
				save_username();
				setTimeout(function(){$('#msgBox').html("<div class='suc'>登录成功，跳转中...</div>");},500);
				setTimeout(function(){$("#msgBox").fadeOut("fast");},1000);
				setTimeout('location.href="{APP_PATH}"',1200);
			} else {
				setTimeout(function(){$('#msgBox').html("<div class='err'>"+data+"</div>");},500);				
				setTimeout(function(){$("#msgBox").fadeOut("fast");},1000);
			}
		});

		return false;
	})
	
	//setTimeout(function(){$("#msgBox").fadeOut("slow");},1000);
})
</script>
</head>
<body style="background:none">
<div id="msgBox">
	<div class="err">用户名或密码错误</div>
	<div class="suc">登录成功，跳转中...</div>
	<div class="loading">登录中，请稍后...</div>
</div>
<div id="login">
	<div class="logo"><img src="{IMG_PATH}108wo/logo.gif" alt="108wo室内设计资源中心" width="400" height="98" /></div>
	<div class="picList">
		<div class="marquee">
			<ul id="boxer">
			{pc:content action="lists" catid="6" num="100" order="id DESC"}
				{loop $data $r}
				<li>
					<img src="{$r[thumb]}" width=220 height=125 />
					<p>{$r[title]}</p>
				</li>
				{/loop}
			{/pc}
			</ul>
		</div>
		<form method="post" action="{APP_PATH}index.php?m=member&c=index&a=login" id="myform" name="myform" onsubmit="return false;">
		<div class="form">
			<div>
				<h1>会员登录<a href="{APP_PATH}index.php?m=member&c=index&a=public_forget_password&siteid={$siteid}">忘记了密码？</a></h1>
				<ul>
					<li>注册邮箱<input type="text" name="username" id="username" class="input"/></li>
					<li>密　　码<input type="password" name="password" id="password" class="input"/></li>
					<li><input type="checkbox" name="cookietime" value="2592000" id="cookietime" class="checkbox"/><span>保存我的登录信息</span></li>
					<li><button type="submit" name="dosubmit" id="dosubmit" value="登录" class="button">立即登录</button></li>
				</ul>
			</div>
		</div>
		<input type="hidden" name="forward" id="forward" value="{$forward}">
		<input type="hidden" name="doajax" id="doajax" value="1">
		<input type="hidden" name="dosubmit" value="1">
		</form>
	</div>
	<div class="copyright">
		<span>Copyright©2010 108wo Inc. All rights reserved. </span><br />
		<a target="blank" href="http://wpa.qq.com/msgrd?V=1&Uin=1605110027&Site=108wo.com&Menu=yes" class="msg">给我们留言</a>|<script src="http://s20.cnzz.com/stat.php?id=3095460&web_id=3095460" language="JavaScript"></script>
	</div>
</div>
<script language="JavaScript">
<!--
	function save_username() {
		if($('#cookietime').attr('checked')==true) {
			var username = $('#username').val();
			setcookie('username', username, 3);
		} else {
			delcookie('username');
		}
	}
	var username = getcookie('username');
	if(username != '' && username != null) {
		$('#username').val(username);
		$('#password').focus();
		$('#cookietime').attr('checked',true);
	} else {
		$('#username').focus();
	}
//-->
</script>
</body>
</html>